<template>
  <div class="box">
    <!--文本操作-->
    <el-form ref="form" label-width="100px" style="width: 90%">
      <el-form-item label="图片来源：">
        <el-radio-group v-model="chooseComponent.option.source">
          <el-radio label="local">本地</el-radio>
          <el-radio label="internet">互联网</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="图片选择：" v-if="chooseComponent.option.source=='local'">
        <el-button size="mini">选择</el-button>
      </el-form-item>
      <el-form-item label="图片地址：" v-if="chooseComponent.option.source=='internet'">
        <el-input size="mini" v-model="chooseComponent.option.url"></el-input>
      </el-form-item>
    </el-form>


  </div>
</template>

<script>
    export default {
        name: "index",
        computed: {
            //当前选中的值
            chooseComponent() {
                return this.$store.state.chooseComponent
            },
        },
    }
</script>

<style scoped lang="less">
  .box {
    width: 100%;
    flex: 1;
    color: white;

    /deep/ .el-form-item__label {
      color: white;
    }

    /deep/ .el-collapse-item__header {
      background-color: #545c64;
      color: white;
    }

    /deep/ .el-collapse-item__content {
      background-color: #545c64;
      color: white;
    }
    /deep/ .el-radio__label{
      color: white;
    }
  }
</style>

